<demo>一键打开 Dialog</demo>

<script setup lang="ts">
import { h } from 'vue';
import Button from '@/lib/Button.vue';
import { openDialog } from '@/lib/openDialog';

const showDialog = () => {
  openDialog({
    title: h('strong', {}, '标题'),
    content: '你好',
    ok() {
      console.log('ok');
    },
    cancel() {
      console.log('cancel');
    },
  });
};
</script>

<template>
  <Button @click="showDialog">打开对话框</Button>
</template>
